﻿Public Class HoSoChuyenVien

    Private Sub HoSoBenhNhan_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Me.TuNgayIDateEdit.EditValue = getNgayDauThang(Today())
        Me.DenNgayIDateEdit.EditValue = getNgayCuoiThang(Today())
        Me.GetHoSoChuyenVienTableAdapter.Fill(Me.PCV_CLINICDataSetTongHop.getHoSoChuyenVien, CDate(Me.TuNgayIDateEdit.EditValue), CDate(Me.DenNgayIDateEdit.EditValue))
    End Sub

    Private Sub BarButtonItemLamTuoi_ItemClick_1(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItemLamTuoi.ItemClick
        Me.GetHoSoChuyenVienTableAdapter.Fill(Me.PCV_CLINICDataSetTongHop.getHoSoChuyenVien, CDate(Me.TuNgayIDateEdit.EditValue), CDate(Me.DenNgayIDateEdit.EditValue))
    End Sub

    Private Sub BarButtonItemBaoCao_ItemClick(sender As System.Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItemBaoCao.ItemClick
        Dim report As Report_HoSoChuyenVien = New Report_HoSoChuyenVien
        report.GetHoSoChuyenVienTableAdapter1.Fill(Me.PCV_CLINICDataSetTongHop.getHoSoChuyenVien, CDate(Me.TuNgayIDateEdit.EditValue), CDate(Me.DenNgayIDateEdit.EditValue))
        report.TuNgay.Value = CDate(Me.TuNgayIDateEdit.EditValue)
        report.DenNgay.Value = CDate(Me.DenNgayIDateEdit.EditValue)
        report.ShowRibbonPreview()
    End Sub
End Class
